<template>
  <view :style="themeColor">
    <view class="page">
      <view class="flex flex-direction flex-wrap align-stretch justify-center benben-position-layout flex system_flex_0"
        :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
        <view class='flex flex-wrap align-stretch justify-between system_fd0_0'>
          <view class='flex flex-wrap align-center system_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
            data-url="1">
            <text class='fu-iconfont2  system_fd0_0_c0_c0'>&#xe794;</text>
          </view>
          <view class='flex flex-wrap align-center'>
            <text class='system_fd0_0_c1_c0'>{{$t('设置')}}</text>
          </view>
          <view class='flex align-center justify-end system_fd0_0_c2'>
          </view>
        </view>

      </view>
      <view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
      <!---基本设置flex布局开始-->
      <view class="flex flex-direction flex-wrap align-stretch system_flex_1">
        <view class='flex flex-direction flex-wrap align-stretch system_fd1_0'>
          <view class='flex flex-wrap align-center justify-between system_fd1_0_c0' @tap.stop="handleJumpDiy"
            data-type="navigateTo" :data-url="`/pages/xtsz/cardAndSafe/cardAndSafe`">
            <text class='system_fd1_0_c0_c0'>{{$t('账号与安全')}}</text>
            <text class='fu-iconfont2  system_fd1_0_c0_c1'>&#xE7F2;</text>
          </view>
        </view>
        <view class='flex flex-wrap align-center system_fd1_1'>
        </view>
        <view class='flex flex-direction flex-wrap align-stretch system_fd1_0'>
          <view class='flex flex-wrap align-center justify-between system_fd1_2_c0' @tap.stop="handleJumpDiy"
            data-type="navigateTo" :data-url="`/pages/xtsz/helpFeedback/helpFeedback`">
            <text class='system_fd1_0_c0_c0'>{{$t('意见反馈')}}</text>
            <text class='fu-iconfont2  system_fd1_0_c0_c1'>&#xE7F2;</text>
          </view>
          <view class='flex flex-wrap align-center justify-between system_fd1_2_c0' @tap.stop="handleJumpDiy"
            data-type="navigateTo" :data-url="`/pages/xtsz/aboutUs/aboutUs`">
            <text class='system_fd1_0_c0_c0'>{{$t('关于我们')}}</text>
            <text class='fu-iconfont2  system_fd1_0_c0_c1'>&#xE7F2;</text>
          </view>
          <view class='flex flex-wrap align-center justify-between system_fd1_2_c0' @tap.stop="handleJumpDiy"
            data-type="navigateTo" :data-url="`/pages/dlzc/agreements/agreements`">
            <text class='system_fd1_0_c0_c0'>{{$t('用户协议')}}</text>
            <text class='fu-iconfont2  system_fd1_0_c0_c1'>&#xE7F2;</text>
          </view>
          <view class='flex flex-wrap align-center justify-between system_fd1_2_c0' @tap.stop="handleJumpDiy"
            data-type="navigateTo" :data-url="`/pages/dlzc/privacyPolicy/privacyPolicy`">
            <text class='system_fd1_0_c0_c0'>{{$t('隐私政策')}}</text>
            <text class='fu-iconfont2  system_fd1_0_c0_c1'>&#xE7F2;</text>
          </view>
          <view class='flex flex-wrap align-center justify-between system_fd1_0_c0' @tap.stop="handleJumpDiy"
            data-type="navigateTo" :data-url="`/pages/xtsz/helpFeedback/helpFeedback`">
            <text class='system_fd1_0_c0_c0'>{{$t('帮助与反馈')}}</text>
            <text class='fu-iconfont2  system_fd1_0_c0_c1'>&#xE7F2;</text>
          </view>
        </view>
        <view class='flex flex-wrap align-center system_fd1_1'>
        </view>
        <view class='flex flex-direction flex-wrap align-stretch system_fd1_0'>
          <view class='flex flex-wrap align-center system_fd1_2_c0' @tap.stop="cleanUpFunc()">
            <text class='system_fd1_0_c0_c0'>{{$t('清除缓存')}}</text>
            <text class='system_fd1_4_c0_c1'>{{appRubbishCacheSize}}</text>
            <text class='fu-iconfont2  system_fd1_0_c0_c1'>&#xE7F2;</text>
          </view>
          <view class='flex flex-wrap align-center system_fd1_0_c0' @tap.stop="updataFunc()"
            v-if=" appSystemIdentification!='Wechat'">
            <text class='system_fd1_0_c0_c0'>{{$t('检查更新')}}</text>
            <text class='system_fd1_4_c0_c1'>{{appVersion}}</text>
            <text class='fu-iconfont2  system_fd1_0_c0_c1'>&#xE7F2;</text>
          </view>
        </view>
        <view class='flex flex-wrap align-center system_fd1_1' v-if=" appSystemIdentification!='Wechat'">
        </view>

      </view>

      <!---基本设置flex布局结束-->
      <benben-popup v-model="popupShow1656992350800" :mask="true" :mask-close-able="true" mode='center'>
        <!---退出登录flex布局开始-->
        <view class="flex flex-direction flex-wrap align-center system_flex_2" @tap.stop="popupShow1650940432200=true">
          <text class='system_fd2_0'>{{$t('提示')}}</text>
          <text class='system_fd2_1'>{{$t('确定退出当前账号？')}}</text>
          <view class='flex align-center system_fd2_2'>
            <button class='system_fd2_2_c0' @tap.stop="popupShow1656992350800=false">{{$t('取消')}}</button>
            <button class='system_fd2_2_c1' @tap.stop="logOutFunc()">{{$t('确定')}}</button>
          </view>
        </view>

        <!---退出登录flex布局结束-->

      </benben-popup>
      <view class="flex flex-wrap align-center justify-center benben-position-layout flex system_flex_3"
        @tap.stop="popupShow1656992350800=true">
        <button class='system_fd3_0'>{{$t('退出登录')}}</button>

      </view>
      <view :style="{height: '140rpx'}"></view>

      <app-update ref="update"></app-update>


    </view>
  </view>
</template>
<script>
  import {
    validate
  } from '@/common/utils/validate.js'

  export default {
    components: {},


    data() {
      return {
        "popupShow1679541357000": false,
        "popupShow1656992350800": false,
        "dataMessage": {
          "aid": "",
          "user_nickname": "",
          "user_avatar": "",
          "user_mobile": "",
          "cancel_type": "",
          "create_time": "",
          "status": "",
          "cancel_reason": "",
          "cancel_type_text": ""
        }
      };
    },
    computed: {
      themeColor() {
        return this.$store.getters.themeColor
      },
      appVersion() {
        // 获取版本号
        return this.$store.state.appVersion
      },
      appRubbishCacheSize() { // 获取缓存大小
        return this.$store.state.appRubbishCacheSize
      },
      /**
       * @returns
       * Android       安卓
       * IOS       苹果
       * Web       H5 或 pc
       * Wechat       微信小程序
       * Alipay       支付宝小程序
       * Baidu       百度小程序
       * ByteBounce       抖音小程序
       * 360       360小程序
       * FastApp       快应用
       */
      appSystemIdentification() {
        return this.$store.state.appSystemIdentification
      }
    },
    watch: {},
    onLoad(options) {

    },
    onUnload() {

    },
    onReady() {

    },
    onShow() {
      this.$store.dispatch('getAppVersion') // 更新版本号
      this.$store.dispatch('getAppCache') // 更新缓存大小
    },
    onHide() {

    },
    onResize() {

    },
    onPullDownRefresh() {

    },
    onReachBottom(e) {

    },
    onPageScroll(e) {

    },
    methods: {
      //清除缓存
      cleanUpFunc() {
        this.$store.dispatch('appClearCache')

      },
      //退出登录
      logOutFunc() {
        this.$store.commit('logout')
        this.$urouter.switchTab(`/pages/tabBar/myhb/myhb`);
      },
      //APP更新
      updataFunc() {
        this.$util.debounce(
          () => {
            this.$refs.update.checkAppUpdate()
          },
          1000,
          true
        )

      },
      //获取注销状态1提交 3驳回
      gozhuxiaoFunc() {
        this.$api.get(global.apiUrls.getUsLogoutRec, {

        }).then(res => {
          if (res.data.code == 0) {
            if (res.data.data == null) {
              uni.navigateTo({
                url: `/pages/xtsz/CancelAccount/CancelAccount`
              })
            } else {
              uni.navigateTo({
                url: `/pages/xtsz/logOutSubmit/logOutSubmit`
              })
            }
          }
        })
        return;

      }
    }
  };
</script>
<style lang="scss" scoped>
  .page {
    width: 100vw;
    overflow-x: hidden;
    min-height: calc(100vh - var(--window-bottom));
    background: rgba(248, 248, 248, 1);
    background-size: 100% auto;
  }

  .system_flex_0 {
    border-bottom: 1px solid #eee;
    background: #fff;
    width: 750rpx;
    height: 88rpx;
    overflow: hidden;
    z-index: 10;
    top: 0rpx;
    background-size: 100% auto !important;
  }

  .system_fd0_0_c2 {
    padding: 0rpx 0rpx 0rpx 0rpx;
    width: 100rpx;
  }

  .system_fd0_0_c1_c0 {
    font-size: 36rpx;
    font-weight: 500;
    color: var(--benbenFontColor0);
  }

  .system_fd0_0_c0_c0 {
    font-size: 36rpx;
    font-weight: 400;
    color: #333;
  }

  .system_fd0_0_c0 {
    width: 100rpx;
  }

  .system_fd0_0 {
    padding: 0rpx 32rpx 0rpx 32rpx;
    line-height: 88rpx;
  }

  .system_flex_1 {
    font-size: 32rpx;
    padding: 0rpx 0rpx 64rpx 0rpx;
  }

  .system_fd1_4_c0_c1 {
    font-size: 28rpx;
    color: rgba(102, 102, 102, 1);
    margin: 0rpx 24rpx 0rpx auto;
  }

  .system_fd1_2_c0 {
    border-bottom: 1px solid #eee;
    padding: 32rpx 0rpx 32rpx 0rpx;
  }

  .system_fd1_1 {
    background: rgba(248, 248, 248, 1);
    height: 20rpx;
    background-size: 100% auto !important;
  }

  .system_fd1_0_c0_c1 {
    font-size: 26rpx;
    color: rgba(191, 191, 191, 1);
  }

  .system_fd1_0_c0_c0 {
    font-size: 32rpx;
    color: var(--benbenFontColor0);
  }

  .system_fd1_0_c0 {
    padding: 32rpx 0rpx 32rpx 0rpx;
  }

  .system_fd1_0 {
    background: #fff;
    padding: 0rpx 32rpx 0rpx 32rpx;
    background-size: 100% auto !important;
  }

  .system_flex_2 {
    background: #fff;
    width: 540rpx;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
  }

  .system_fd2_2_c1 {
    border-top: 1px solid #eee;
    border-left: 1px solid #eee;
    background: #fff;
    line-height: 110rpx;
    border-radius: 0rpx 0rpx 16rpx 0rpx;
    font-size: 32rpx;
    color: var(--benbenbgColor7);
    width: 268rpx;
  }

  .system_fd2_2_c0 {
    border-top: 1px solid #eee;
    background: #fff;
    line-height: 110rpx;
    border-radius: 0rpx 0rpx 0rpx 16rpx;
    font-size: 32rpx;
    color: rgba(153, 153, 153, 1);
    width: 268rpx;
  }

  .system_fd2_2 {
    margin: 37rpx 0rpx 0rpx 0rpx;
  }

  .system_fd2_1 {
    line-height: 44rpx;
    font-size: 32rpx;
    font-weight: 500;
    color: #333333;
  }

  .system_fd2_0 {
    font-size: 36rpx;
    font-weight: 800;
    line-height: 44rpx;
    color: #333333;
    margin: 40rpx 0rpx 40rpx 0rpx;
  }

  .system_flex_3 {
    background: #fff;
    width: 750rpx;
    height: 140rpx;
    overflow: hidden;
    z-index: 10;
    bottom: calc(0rpx + var(--window-bottom));
    background-size: 100% auto !important;
  }

  .system_fd3_0 {
    border: 2px solid var(--benbenbdColor0);
    background: var(--benbenbgColor7);
    border-radius: 44rpx 44rpx 44rpx 44rpx;
    font-size: 32rpx;
    color: var(--benbenFontColor3);
    width: 638rpx;
    height: 88rpx;
    line-height: 88rpx;
    margin: 0rpx 24rpx 0rpx 24rpx;
  }

  .system_flex_4 {
    background: #fff;
    width: 540rpx;
    border-radius: 16rpx 16rpx 16rpx 16rpx;
  }

  .system_fd4_2_c1 {
    border-top: 1px solid #eee;
    border-left: 1px solid #eee;
    background: #fff;
    line-height: 110rpx;
    border-radius: 0rpx 0rpx 16rpx 0rpx;
    font-size: 32rpx;
    color: var(--benbenFontColor5);
    width: 267rpx;
  }

  .system_fd4_2_c0 {
    border-top: 1px solid #eee;
    background: #fff;
    line-height: 110rpx;
    border-radius: 0rpx 0rpx 0rpx 16rpx;
    font-size: 32rpx;
    color: rgba(153, 153, 153, 1);
    padding: 0rpx 103rpx 0rpx 103rpx;
  }

  .system_fd4_2 {
    margin: 37rpx 0rpx 0rpx 0rpx;
  }

  .system_fd4_1 {
    line-height: 44rpx;
    font-size: 32rpx;
    font-weight: 500;
    color: #333333;
  }

  .system_fd4_0 {
    font-size: 36rpx;
    font-weight: 800;
    line-height: 44rpx;
    color: #333333;
    margin: 40rpx 0rpx 40rpx 0rpx;
  }
</style>
